<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<meta http-equiv="Access-Control-Allow-Origin" content="*">
		<title>编辑文章</title>
		<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
		<link rel="stylesheet" href="../lib/layui/css/layui.css">
		<link rel="stylesheet" href="../css/scroll-bar.css">
		<link rel="stylesheet" href="../css/sub-page.css">
		<link rel="stylesheet" href="//at.alicdn.com/t/font_693759_wytlyqhtdtj1nhfr.css">
	</head>

	<body>
		<div class="ok-body">
			<!--面包屑导航区域-->
			<div class="ok-body-breadcrumb">
				<span class="layui-breadcrumb">
                <a><cite>接待页面</cite></a>
                <a><cite>订单预览</cite></a>
				<a><cite>维修计划</cite></a>
            </span>
				<a class="layui-btn layui-btn-small" href="javascript:location.replace(location.href);" title="刷新">
					<i class="layui-icon layui-icon-refresh"></i>
				</a>
			</div>
			<!--form表单-->
			<form class="layui-form ok-form">
				<div class="layui-form-item">
					<label class="layui-form-label">用户信息</label>
					<div class="layui-userinfo">
						<table>
							<tr>
								<td>编号</td>
								<td><input style="border:none;outline:medium;" readonly="readonly" class="orderId" /></td>
							</tr>
							<tr>
								<td>姓名</td>
								<td><input style="border:none;outline:medium;" readonly="readonly" class="customerName" /></td>
							</tr>
							<tr>
								<td>车牌号</td>
								<td><input style="border:none;outline:medium;" readonly="readonly" class="carPlate" /></td>
							</tr>
							<tr>
								<td>电话号码</td>
								<td><input style="border:none;outline:medium;" readonly="readonly" class="customerPhone" /></td>
							</tr>
							<tr>
								<td>下单时间</td>
								<td><input style="border:none;outline:medium;" readonly="readonly" class="orderTime" /></td>
							</tr>

						</table>
					</div>
				</div>
				<div class="layui-form-item layui-form-text">
					<label class="layui-form-label">维修计划</label>
					<div class="layui-input-block">
						<table id="tian">
							<tr>
								<td><input id="1" style="border:none;outline:medium;" readonly="readonly" name="wexiu" type="text" class="layui-input" value="1.座椅坏了"/></td>
								<td><input id="2" style="border:none;outline:medium;" readonly="readonly" name="wexiu" type="text" class="layui-input" value="需要更换座椅"/></td>
							</tr>
							<tr>
								<td><input id="3" style="border:none;outline:medium;" readonly="readonly" name="wexiu" type="text" class="layui-input" value="2.空调坏了"/></td>
								<td><input id="4" style="border:none;outline:medium;" readonly="readonly" name="wexiu" type="text" class="layui-input" value="需要更换空调"/></td>
							</tr>
						</table>
					</div>
				</div>
				<div class="layui-form-item">
					<div class="layui-input-block">
						<button class="layui-btn" lay-submit lay-filter="edit">完成</button>
					</div>
				</div>
			</form>
		</div>
		<!--js逻辑-->
		<script src="../lib/layui/layui.js"></script>
		<script>
			layui.use(['element', 'form', 'jquery', 'laydate'], function() {
				var element = layui.element;
				var table = layui.table;
				var form = layui.form;
				var $ = layui.jquery;
				var laydate = layui.laydate;

				form.verify({
					birthdayVerify: [/^((((1[6-9]|[2-9]\d)\d{2})-(0?[13578]|1[02])-(0?[1-9]|[12]\d|3[01]))|(((1[6-9]|[2-9]\d)\d{2})-(0?[13456789]|1[012])-(0?[1-9]|[12]\d|30))|(((1[6-9]|[2-9]\d)\d{2})-0?2-(0?[1-9]|1\d|2[0-8]))|(((1[6-9]|[2-9]\d)(0[48]|[2468][048]|[13579][26])|((16|[2468][048]|[3579][26])00))-0?2-29-))(\s(([01]\d{1})|(2[0123])):([0-5]\d):([0-5]\d))?$/, '日期格式不正确']
				});
				form.on('submit(edit)', function(data) {
					var id = $("input[class=orderId]").val();

					$.post("http://function.516code.cn/functionPage/function/ConfirmationOfRepair.do",{"id":id}, function(res) {
                        if(res==true){
                            layer.msg("上传成功！", {icon: 6, time: 1000, anim: 4}, function () {
                                parent.layer.close(parent.layer.getFrameIndex(window.name));
                            });
                        }else{

                            layer.msg("上传失败！", {icon: 6, time: 1000, anim: 4}, function () {
                                parent.layer.close(parent.layer.getFrameIndex(window.name));
                            });
                        }
						
						
					}, 'json');
					
					return false;

				});

			})
		</script>
	</body>

</html>